home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / catn / dialog.n < prev    next >
Text File  |  1994-09-20  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. tk_dialog(n)               Tk Commands                        7.0
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      tk_dialog - Create modal dialog and wait for response
  12.  
  13. SYNOPSIS
  14.      tk_dialog _w_i_n_d_o_w _t_i_t_l_e _t_e_x_t _b_i_t_m_a_p _d_e_f_a_u_l_t _s_t_r_i_n_g _s_t_r_i_n_g ...
  15. _________________________________________________________________
  16.  
  17.  
  18. DESCRIPTION
  19.      This procedure is part of the Tk script library.  Its  argu-
  20.      ments describe a dialog box:
  21.  
  22.      _w_i_n_d_o_w
  23.           Name of top-level window to use for dialog.  Any exist-
  24.           ing window by this name is destroyed.
  25.  
  26.      _t_i_t_l_e
  27.           Text to appear in the window manager's  title  bar  for
  28.           the dialog.
  29.  
  30.      _t_e_x_t Message to appear in the top portion of the dialog box.
  31.  
  32.      _b_i_t_m_a_p
  33.           If non-empty, specifies a bitmap to display in the  top
  34.           portion  of  the  dialog,  to the left of the text.  If
  35.           this is an empty string then no bitmap is displayed  in
  36.           the dialog.
  37.  
  38.      _d_e_f_a_u_l_t
  39.           If this is an integer greater than or  equal  to  zero,
  40.           then it gives the index of the button that is to be the
  41.           default button for the dialog (0 for the leftmost  but-
  42.           ton,  and so on).  If less than zero or an empty string
  43.           then there won't be any default button.
  44.  
  45.      _s_t_r_i_n_g
  46.           There will be one button for each of  these  arguments.
  47.           Each  _s_t_r_i_n_g  specifies text to display in a button, in
  48.           order from left to right.
  49.  
  50.      After creating a dialog box, tk_dialog waits for the user to
  51.      select  one  of the buttons either by clicking on the button
  52.      with the mouse or by typing return  to  invoke  the  default
  53.      button  (if any).  Then it returns the index of the selected
  54.      button:  0 for the leftmost button, 1 for the button next to
  55.      it, and so on.
  56.  
  57.      While waiting for the user  to  respond,  tk_dialog  sets  a
  58.      local  grab.   This  prevents the user from interacting with
  59.      the application in any way except to invoke the dialog box.
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. tk_dialog(n)               Tk Commands                        7.0
  71.  
  72.  
  73.  
  74. KEYWORDS
  75.      bitmap, dialog, modal
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Tk                                                              2
  130.  
  131.  
  132.  
  133.